﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    namespace SRM532
    {
        class DengklekTryingToSleep
        {
            public static int minDucks(int[] ducks)
            {
                List<int> d = new List<int>(ducks);
                d.Sort();
                return d[d.Count-1] - d[0] - d.Count + 1;
            }
        }

        class DengklekMakingChains
        {
            public static int maxBeauty(string[] chains)
            {
                return 0;
            }
            public static int b(string s)
            { 
                int sum = 0;
                for (int i = 0; i < s.Length; i++)
                {
                    if (s[i] != '.') sum += s[i] - '0';
                }
                return sum;
            }

        }
    }
}
